import print from 'az-print'

function install(Vue, defaultOpts = {}) {
  Vue.prototype.$print = function (options, delay = 200) {
    print(Object.assign(defaultOpts, options), delay)
  }
}

class AzPrint {}
AzPrint.install = install

if (window && window.Vue) {
  window.Vue.use(AzPrint)
}

export default AzPrint
